package com.elinkway.infinitemovies.http.parser;

import android.text.TextUtils;

import com.elinkway.infinitemovies.bean.CommonBean;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by xiaojian on 16-3-14.
 */
public class CommonParser extends LVideoMobileParser<CommonBean> {
    private JSONObject arr;

    @Override
    public CommonBean parse(JSONObject data) throws Exception {
        CommonBean mCommonBean = new CommonBean();
        mCommonBean.setCode(super.getCode());
        mCommonBean.setMsg(super.getMsg());
        return mCommonBean;
    }

    @Override
    protected JSONObject getData(String data) throws JSONException {
        // TODO Auto-generated method stub
        if (!TextUtils.isEmpty(data)) {
            arr = new JSONObject(data);
        }
        data = "{\"data\":\"data\"}";
        return super.getData(data);
    }
}
